Kerry Back
BUSI 721, Fall 2022
JGSB, Rice University
Let’s look at the history of stock market returns - either the U.S. market as a whole or individual stocks or funds.
We’ll do this with several different plot types:
-scatter plot of returns by year
- box plot of annual returns
- accumulation (1+r1)⋯(1+rn) by year
- accumulation by year with log scale
Box contains 25th percentile through 75th percentile
Median is indicated in the box
Fences extend 1.5 times inter-quartile range from 25th and 75th percentiles or to the most extreme observation if that is closer to the box (inter-quartile range = 75th percentile - 25th percentile)
Points outside the fences are outliers (if you simulate data from a normal distribution, there will typically be very few points outside the fences)
Market data is from Kenneth French’s data library
Value-weighted return of all NYSE, AMEX, and Nasdaq stocks from CRSP
(Center for Research in Security Prices at U of Chicago)To see all of the filenames in French’s data library:
pdr downloads each file as a dictionary. Each contains a ‘DESCR’ key. The value of that key is a string that explains the other key/value pairs in the dictionary.
It is easy to plot what $1 would grow to after n periods: \[ (1+r_1)⋯(1+r_{\text{n}}) \]
But, when the time period is long, it may be hard to see what happened in the early years, due to exponential growth.
But the returns are
Consider a function of time y(t). From calculus,
\[ \text{d}logy(t)∝\frac{\text{d}y(t)}{logy(t)}= \text{% change in y} \] where ∝ is = for the natural logarithm.
So a plot of logy(t) reveals the percent changes.
Plotting the base 10 logarithm of accumulation:
The exact same plot, but replace 1 on the y axis with \(10^{1}\) and replace 2 with \(10^{2}\).
This means the y axis is in $.
Suppose ret is a Series of returns in decimal form indexed by date.